﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;

namespace YiSha.Entity.QixingManage
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2024-03-23 13:44
    /// 描 述：商品属性颜色实体类
    /// </summary>
    [Table("goods_attr")]
    public class GoodsAttrEntity : BaseEntity
    {
        /// <summary>
        /// 商品ID
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? goods_id { get; set; }
        /// <summary>
        /// 属性名
        /// </summary>
        /// <returns></returns>
        public string attr_name { get; set; }
        /// <summary>
        /// 属性值
        /// </summary>
        /// <returns></returns>
        public string attr_values { get; set; }
        /// <summary>
        /// 是否删除,0-否，1-是
        /// </summary>
        /// <returns></returns>
        public int? is_del { get; set; }

        /// <summary>
        /// 库存数
        /// </summary>
        public int count { get; set; }

        public DateTime? BaseModifyTime { get; set; }
        /// <summary>
        /// 商品价格
        /// </summary>
        public decimal? price { get; set; }
        /// <summary>
        /// 成本价格
        /// </summary>
        public decimal? costprice { get; set; }
        /// <summary>
        /// 市场价格
        /// </summary>
        public decimal? mktprice { get; set; }

        /// <summary>
        /// 是否默认1是0否
        /// </summary>
        public int? isDefault { get; set; }
    }

    /// <summary>
    /// 商品会员折扣
    /// </summary>
    [Table("GoodsMemberGrade")]
    public class GoodsMemberGradeEntity : BaseEntity
    {
        /// <summary>
        /// 商品ID
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? goodsId { get; set; }
        /// <summary>
        /// 会员id
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? memberId { get; set; }
        /// <summary>
        /// 会员折扣
        /// </summary>
        /// <returns></returns>
        public decimal memberDiscount { get; set; }
        /// <summary>
        /// 会员名称
        /// </summary>
        /// <returns></returns>
        public string memberName { get; set; }
    }
}
